from lib.sensors.soil import LM393
from lib.config.index import sensor_config

config = sensor_config.get_sensor("LM393")
print(config)
A0 = config["A0"]
D0 = config["D0"]


soil = LM393.Soil(A0, D0)


def demo():
    import time

    while True:
        print(soil.read_analog())
        time.sleep(1)


if __name__ == "__main__":
    demo()
